Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] add the "unknown" multiaddr #74

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

[WIP] add the "unknown" multiaddr #74

wants to merge 2 commits into from

Conversation

Stebalien
Copy link
Member

@Stebalien Stebalien commented Jul 18, 2018

This should be considered carefully. We may want to modify the API to support it.

implements multiformats/multiaddr#70

This should be considered carefully. We may want to modify the API to support
it.
@@ -17,6 +17,8 @@ type Protocol struct {
Name string

// Code is the protocol's multicodec (a normal, non-varint number).
//
// -1 is reserved for the special "unknown" protocol.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment seems to be inconsistent with the rest of the code. e.g.:

ps = append(ps, Protocol{
  Name: "unknown",
  Size: -1,
  Code: 0,
})

IMO, -1 for unknown protocol fells better.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I changed my mind multiple times half-way through. I agree.

@Stebalien Stebalien changed the base branch from feat/better-protocol to master July 21, 2018 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants